package com.le.tester.javaThink.fifth.chapter24_ConcurrentProgramming;


import java.time.LocalDateTime;

/**
 * createTime：2021/8/24 11:22
 * description：OnePizza
 */
public class OnePizza {
    public static void main(String[] args) {
        Pizza pizza = new Pizza(0);
        int startTime = LocalDateTime.now().getSecond();
        while (!pizza.complete()) {
            pizza.next();
        }
        int endTime = LocalDateTime.now().getSecond();
        System.out.println(endTime - startTime);
    }
}
